This markdown documents the data analysis performed on consumer data to assess the demand on fish and perceived availability pre and post covid 19.
From the survey there were 120 that were collected in markets around the region.
The range of ages was from 21 to 68, with a mean age of 40.8 and a median age of 40
The survey gained responses from 103 males (85.8333333) and 17 females (14.1666667).
#####################################################################
#
# Determine if the demand for fish has increased postCOVID
#
# Need to restructure the data.frame to have a factor for pre and post
# covid and then the data into single columns
#
# Data required = Amount, Frequency of consumption, Freq for each type
#####################################################################
# Analysis of the main protein source pre and post covid
# This function will be used to store likert questions into separate groups:
library(likert)
## Loading required package: ggplot2
## Loading required package: xtable
# Statistical analysis of differences in the amounts purchased
PreCovidAmount.prob = table(ConsumerData$Amount_1)/NumberResponses
PostCovidAmount.freq = table(ConsumerData$Amount_2)
Amount_Chi <- chisq.test(PostCovidAmount.freq,
p = PreCovidAmount.prob)
LikertData = data.frame(cbind(
c(rep("Pre-COVID19", NumberResponses), rep("Post-COVID19", NumberResponses)),
Amount = c(ConsumerData[, .(Amount_1)]$Amount_1, ConsumerData[, .(Amount_2)]$Amount_2),
FreqC = c(ConsumerData[, .(Consume_1)]$Consume_1, ConsumerData[, .(Consume_2)]$Consume_2),
Freq_Pang = c(ConsumerData[, .(Freq_Pang_1)]$Freq_Pang_1, ConsumerData[, .(Freq_Pang_2)]$Freq_Pang_2),
Freq_Tila = c(ConsumerData[, .(Freq_Tila_1)]$Freq_Tila_1, ConsumerData[, .(Freq_Tila_2)]$Freq_Tila_2),
Freq_Carp = c(ConsumerData[, .(Freq_Carp_1)]$Freq_Carp_1, ConsumerData[, .(Freq_Carp_2)]$Freq_Carp_2),
Freq_OtherCat = c(ConsumerData[, .(Freq_OtherCat_1)]$Freq_OtherCat_1, ConsumerData[, .(Freq_OtherCat_2)]$Freq_OtherCat_2)
))
# Remove those that did not buy a species pre and post covid
Ind_NonPang <- c(ConsumerData[, .I[Freq_Pang_1 == "Never" & Freq_Pang_2 == "Never"]],
ConsumerData[, .I[Freq_Pang_1 == "Never" & Freq_Pang_2 == "Never"]] + 120)
LikertData$Freq_Pang[Ind_NonPang] <- NA
Ind_NonTila <- c(ConsumerData[, .I[Freq_Tila_1 == "Never" & Freq_Tila_2 == "Never"]],
ConsumerData[, .I[Freq_Tila_1 == "Never" & Freq_Tila_2 == "Never"]] + 120)
LikertData$Freq_Tila[Ind_NonTila] <- NA
Ind_NonCarp <- c(ConsumerData[, .I[Freq_Carp_1 == "Never" & Freq_Carp_2 == "Never"]],
ConsumerData[, .I[Freq_Carp_1 == "Never" & Freq_Carp_2 == "Never"]] + 120)
LikertData$Freq_Carp[Ind_NonCarp] <- NA
Ind_NonOtherCat <- c(ConsumerData[, .I[Freq_OtherCat_1 == "Never" & Freq_OtherCat_2 == "Never"]],
ConsumerData[, .I[Freq_OtherCat_1 == "Never" & Freq_OtherCat_2 == "Never"]] + 120)
LikertData$Freq_OtherCat[Ind_NonOtherCat] <- NA
LikertData$Amount = factor(LikertData$Amount,
levels = c("1", "2", "3", "4", "5"),
labels = c("< 2 kg/week", "2-5 kg/week", "5-7 kg/week", "7-10 kg/week", "> 10 kg/week"),
ordered = TRUE)
LikertData$FreqC = factor(LikertData$FreqC,
levels = c("1", "2", "3", "4", "5"),
labels = c("Everyday", "On average 2-3 times a week","Once every week","Once a month", "Never"),
ordered = TRUE)
LikertData$Freq_Pang = factor(LikertData$Freq_Pang,
levels = c("1", "2", "3", "4"),
labels = c("Regularly", "Occasionally","Rarely","Never"),
ordered = TRUE)
LikertData$Freq_Tila = factor(LikertData$Freq_Tila,
levels = c("1", "2", "3", "4"),
labels = c("Regularly", "Occasionally","Rarely","Never"),
ordered = TRUE)
LikertData$Freq_Carp = factor(LikertData$Freq_Carp,
levels = c("1", "2", "3", "4"),
labels = c("Regularly", "Occasionally","Rarely","Never"),
ordered = TRUE)
LikertData$Freq_OtherCat = factor(LikertData$Freq_OtherCat,
levels = c("1", "2", "3", "4"),
labels = c("Regularly", "Occasionally","Rarely","Never"),
ordered = TRUE)
names(LikertData) <- c("COVID", "(b) What is the amount of fish you buy each week (kg)", "(a) How many times per week do you eat fish?",
"(c) How often do you buy Pangasius?",
"(d) How often do you buy Tilapia?",
"(e) How often do you buy Carp?",
"(f) How often do you buy Other Catfish?")
FishWeeklyConsumption = likert(LikertData[, 3, drop = FALSE], grouping = LikertData$COVID)
FreqPlot <- plot(FishWeeklyConsumption,
col=c("#cccccc", "#bdbdbd", "#969696", "#636363","#252525"))
FreqPlot
FishAmountWeekly = likert(LikertData[,2, drop = FALSE], grouping = LikertData$COVID)
AmountPlot <- plot(FishAmountWeekly,
col=c("#cccccc", "#bdbdbd", "#969696", "#636363","#252525"))
AmountPlot
FishTypePurchaseFreq = likert(LikertData[, 4:7], grouping = LikertData$COVID)
FreqFishTypePlot <- plot(FishTypePurchaseFreq,
col=c("#d9d9d9", "#969696", "#636363", "#252525"))
FreqFishTypePlot
# Work out whether the consumer has changed buying pattern for each species
ConsumerData[, Pang_Change := as.numeric(Freq_Pang_2) - as.numeric(Freq_Pang_1)]
ConsumerData[Pang_Change != 0, Pang_Change := Pang_Change/abs(Pang_Change)]
ConsumerData[, Tila_Change := as.numeric(Freq_Tila_2) - as.numeric(Freq_Tila_1)]
ConsumerData[Tila_Change != 0, Tila_Change := Tila_Change/abs(Tila_Change)]
ConsumerData[, Carp_Change := as.numeric(Freq_Carp_2) - as.numeric(Freq_Carp_1)]
ConsumerData[Carp_Change != 0, Carp_Change := Carp_Change/abs(Carp_Change)]
ConsumerData[, OtherCat_Change := as.numeric(Freq_OtherCat_2) - as.numeric(Freq_OtherCat_1)]
ConsumerData[OtherCat_Change != 0, OtherCat_Change := OtherCat_Change/abs(OtherCat_Change)]
# For never purchasing for both pre and post covid set to NA
ConsumerData[Freq_Pang_1 == "Never" & Freq_Pang_2 == "Never", Pang_Change := NA]
ConsumerData[Freq_Tila_1 == "Never" & Freq_Tila_2 == "Never", Tila_Change := NA]
ConsumerData[Freq_Carp_1 == "Never" & Freq_Carp_2 == "Never", Carp_Change := NA]
ConsumerData[Freq_OtherCat_1 == "Never" & Freq_OtherCat_2 == "Never", OtherCat_Change := NA]
# Set up groups and plot together
groups <- list(
"Consumption Frequency" = c("(a) How many times per week do you eat fish?"),
"Consumption Amount" = c("(b) What is the amount of fish you buy each week (kg)"),
"Species Preference" = c("(c) How often do you buy Pangasius?",
"(d) How often do you buy Tilapia?",
"(e) How often do you buy Carp?",
"(f) How often do you buy Other Catfish?")
)
library(gridExtra)
TotalPlot <- grid.arrange(FreqPlot, AmountPlot, FreqFishTypePlot, nrow = 3,
heights=c(0.25,0.25,0.5))
# Use commmand line for now
ggsave(file="CombinedLikertPlot.png", TotalPlot)
## Saving 7 x 5 in image
Pre COVID the main protein sources were:
Fish: 102 or 85
Chicken: 10 or 8.3333333
Egg: 6 or 5
Beef: 2 or 1.6666667
Post COVID the main protein sources were:
Fish: 77 or 64.1666667
Chicken: 12 or 10
Egg: 25 or 20.8333333
Beef: 6 or 5
For those changing the main source they changed to:
Fish: 5
Chicken: 9
Egg: 21
Beef: 5
For those changing from fish, they changed to: Chicken: 7
Egg: 19
Beef: 4
For those changing to fish, they changed from: Chicken: 4
Egg: 0
Beef: 1
For each category the amount of fish purchased was:
PRECOVID19
POSTCOVID19
Using the precovid data as expected probabilities then comparing the frequency of post-covid responses by chi-squared test:
The chi=squared value is: 18.1788497
The p-value is: 4.040259710^{-4}
The residuals are: 3.0983867, 1.1428571, -2.236068, -1.5075567
Using the data we can extract the number that increased purchasing, those that decreased purchasing and those that stayed the same.
Increased amount purchased = 12
Decreased amount purchased = 39
No change = 69
PRECOVID19
POST_COVID
From the survey data the number of respondents that changed their purchasing of fish was:
Total number of responses in all categories (those that bought fish): 426
Total number that did not change buying hapbits: 230
Number that have bought: 94
Number that bought pre-COVID: 92
Number that bought post-COVID: 89
Never buy: 26
No change in buying: 46
Increased post-covid: 14
Decreased post-covid: 34
Number that have bought: 102
Number that bought pre-COVID: 101
Number that bought post-COVID: 95
Never buy: 18
No change in buying: 72
Increased post-covid: 22
Decreased post-covid: 8
Number that have bought: 114
Number that bought pre-COVID: 112
Number that bought post-COVID: 114
Never buy: 6
No change in buying: 59
Increased post-covid: 50
Decreased post-covid: 5
Number that have bought: 116
Number that bought pre-COVID: 114
Number that bought post-COVID: 112
Never buy: 4
No change in buying: 53
Increased post-covid: 41
Decreased post-covid: 22
To understand if the differences seen were significant a binomial test was performed. Basically, those respondents that did not change their frequency were discounted and for the remaining the null hypothesis was that there was an equal probability that the respondent increased or decreased the frequency with which they purchased that type of fish. An exact binomial test was performed using an increase in frequency as a successful outcome.
For Pangasius the change in the purchasing between pre and post covid:
Test Statistic p-value: 0.0055152
Estimated p of succcess: 0.2916667
95% confidence limits: 0.1695308 to 0.4406348
This suggests a significant decrease in purchase frequency of pangasius
For Tilapia the change in the purchasing between pre and post covid:
Test Statistic p-value: 0.0161248
Estimated p of succcess: 0.7333333
95% confidence limits: 0.5411063 to 0.8772052
This suggests no significant change in the purchasing frequency of tilapia
For carp the change in the purchasing between pre and post covid:
Test Statistic p-value: 2.135842610^{-10}
Estimated p of succcess: 0.9090909
95% confidence limits: 0.8004604 to 0.9698191
This suggests a significant increase in the purchasing frequency of carp
For other catfish the change in the purchasing between pre and post covid:
Test Statistic p-value: 0.022575
Estimated p of succcess: 0.6507937
95% confidence limits: 0.5202662 to 0.7666294
This suggests no significant change in the purchase frequency of other catfish
Plot of the reasons for changing the species purchased and which species was increased or decreased.
For those than increased carp purchases:
I have changed the species because they are more available - 18
I have changed the species because they are cheaper - 25
I have changed the species because they are more nutritious - 23
I have changed the species because they are easier to prepare - 15
I have changed the species because they are better for the immune system - 20
Assuming equal chance of each category being selected the chi squared test is:
Chi Squared value of : 3.1089109
P value of : 0.5397677
Residuals: = -0.4894936, 1.067986, 0.6229918, -1.1569848, -0.0444994